home *** CD-ROM | disk | FTP | other *** search
- Path: erich.triumf.ca!bennett
- From: bennett@erich.triumf.ca (P.Bennett)
- Newsgroups: comp.lang.c
- Subject: Re: Why won't this compile????
- Date: 17 Feb 1996 14:52 PST
- Organization: TRIUMF: Tri-University Meson Facility
- Distribution: world
- Message-ID: <17FEB199614525629@erich.triumf.ca>
- References: <4g50et$9lh@steel.interlog.com>
- NNTP-Posting-Host: ftp.triumf.ca
- News-Software: VAX/VMS VNEWS 1.50
-
- In article <4g50et$9lh@steel.interlog.com>, kingkaos@interlog.com (King Kaos) writes...
- >
- > Hi. Can someone please explain why this program won't
- >compile without errors? I am using Power C under DOS.
-
- <snip...>
- > swap(&var1, &var2);
- > printf("Variables after swap");
- > printf("var1 = %d , var2 = %d\n,var1,var2);
- >}
- >And, heres the C.ERR file:
- >
- >pointc~1.txt(18):}
- >**************** ^202
- > 202: String constant cannot span lines
-
- Look carefully at the printf() statement I left above - I think you will find
- that you left off the closing quotes. The compiler therefore thinks that the
- "string constant" ("var1 = %d, var2 = %d\n,var1,var2....) goes beyond the end
- of that line.
-
- The rest of the error messages are probably as a result of the compiler getting
- confused here, and should go away when you fix this (but I didn't check the
- remaining code...)
-
- Peter Bennett VE7CEI | Vessels shall be deemed to be in sight
- Internet: bennett@triumf.ca | of one another only when one can be
- Packet: ve7cei@ve7kit.#vanc.bc.ca | observed visually from the other
- TRIUMF, Vancouver, B.C., Canada | ColRegs 3(k)
- GPS and NMEA info and programs: ftp://sundae.triumf.ca/pub/peter/index.html
-
-
-
-
-
-
-
-
-
-